﻿using System.Collections.Generic;
using System.Xml.Serialization;

namespace ViaConvert.Model
{
    public class Xml
    {
        [XmlRoot("AddressInfo")]
        public class AddressInfo
        {
            [XmlElement("City")]
            public List<City> City { get; set; }
        }
        
        public class City
        {
            [XmlAttribute("name")]
            public string name { get; set; }
            
            [XmlAttribute("code")]
            public string code { get; set; }

            [XmlElement("District")]
            public List<District> District { get; set; }
        }

        public class District
        {
            [XmlAttribute("name")]
            public string name { get; set; }

            [XmlElement("Zip")]
            public List<Zip> Zip { get; set; }
        }

        public class Zip
        {
            [XmlAttribute("code")]
            public string code { get; set; }

        }
    }
}